/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package tracksuite.presentation;

import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
import tracksuite.bussiness.CategoryBO;
import tracksuite.exception.GenericException;
import tracksuite.integration.CategoryTO;

/**
 *
 * @author mfloriano
 */
public class CategoryBean extends GenericBean<CategoryBO> {

    public CategoryBean() {
        this.bo = new CategoryBO();
    }
  
    @Override
    public String actionInsert() {
        try {
            CategoryTO categoryTO = new CategoryTO();
            categoryTO.setName("teste");
            this.bo.insert(categoryTO);
            return "OK";
        } catch (GenericException ex) {
            Logger.getLogger(CategoryBean.class.getName()).log(Level.SEVERE, null, ex);
            return "ERROR";
        }
    }

    @Override
    public String actionDelete() {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    @Override
    public String actionUpdate() {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    @Override
    public List getAll() {
        throw new UnsupportedOperationException("Not supported yet.");
    }
    
    
}
